-
Notifications
You must be signed in to change notification settings - Fork 555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: set priority in monadic class instances #6725
base: master
Are you sure you want to change the base?
Conversation
!bench |
Mathlib CI status (docs):
|
!bench |
Here are the benchmark results for commit f0232ae. Benchmark Metric Change
============================================================
- big_omega.lean MT branch-misses 6.9% (16.8 σ)
- bv_decide_inequality.lean branch-misses 1.2% (13.6 σ)
- bv_decide_mul branch-misses 2.6% (13.6 σ)
- bv_decide_realworld branch-misses 1.4% (14.1 σ)
- lake build clean wall-clock 1.2% (18.6 σ)
+ language server startup maxrss -1.1% (-14.7 σ) |
I think this is noise again. |
It seems like for some tests the standard deviation isn't calibrated correctly. |
We briefly looked at this PR, and found that it’s not quite there yet:
As this fixes a P-low issue, ideally not too much effort will be spent on this, by you and the reviewers. |
This PR changes the priority of some instances with monad transformers, most notably adding
high
priority toMonadExceptOf ε (ExceptT ε m)
. This means that inExceptT α MetaM
,throw
will now throw theα
instead of theException
.These instances now have
high
priority:And these instance now have
low
priority:The last one makes sure that the
OrElse
instance has lower priority thaninstOrElseOfAlternative
(this change doesn't affect the synthesis order, because the order of the files in which the instances were declared was already 'correct').In Prelude.lean, instead of setting the priority to
high
orlow
, it has to be set to10000
or100
, which is the same.The increased priority of
MonadExceptOf ε (ExceptT ε m)
affected a few files that had to be fixed.Closes #4212